/**
 * Copyright (C), 2015-2018, XXX有限公司
 * FileName: ArticleMapper
 * Author:   臧浩鹏
 * Date:     2018/8/4 10:25
 * Description: 测试
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.play.mapper;

import com.play.model.Article;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * 〈一句话功能简述〉<br> 
 * 〈测试〉
 *
 * @author 臧浩鹏
 * @create 2018/8/4
 * @since 1.0.0
 */
@Repository
public interface ArticleMapper {

    @Insert("insert into article (a_uid,atitle,aimage) values (#{auid},#{atitle},#{aimage})")
    @Options(useGeneratedKeys=true, keyProperty="aid", keyColumn="aid")
    Integer insertArticle(Article article);//@Param(value = "atitle") String atitle, @Param(value = "aimage") String aimage);

    @Select("select * from article where aid = #{aid}")
    Article selectByAid(@Param("aid") Integer aid);
}
